package org.bouncycastle.math.ec;

/**
 * Class holding precomputation data for the WTNAF (Window
 * <code>&tau;</code>-adic Non-Adjacent Form) algorithm.
 */
class WTauNafPreCompInfo implements PreCompInfo {
	/**
	 * Array holding the precomputed <code>ECPoint.F2m</code>s used for the WTNAF
	 * multiplication in <code>
	 * {@link WTauNafMultiplier#multiply(ECPoint, java.math.BigInteger, PreCompInfo)}</code>.
	 */
	private ECPoint.F2m[] preComp = null;

	/**
	 * Constructor for <code>WTauNafPreCompInfo</code>
	 * 
	 * @param preComp Array holding the precomputed <code>ECPoint.F2m</code>s used
	 *                for the WTNAF multiplication in <code>
	 * {@link WTauNafMultiplier#multiply(ECPoint, java.math.BigInteger, PreCompInfo)}</code>.
	 */
	WTauNafPreCompInfo(ECPoint.F2m[] preComp) {
		this.preComp = preComp;
	}

	/**
	 * @return the array holding the precomputed <code>ECPoint.F2m</code>s used for
	 *         the WTNAF multiplication in <code>
	 * {@link WTauNafMultiplier#multiply(ECPoint, java.math.BigInteger, PreCompInfo)}</code>.
	 */
	protected ECPoint.F2m[] getPreComp() {
		return preComp;
	}
}
